﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Serialization;
using System.Collections;
using System.Runtime.Serialization;

namespace CXMLStudioIDE.Common.EntityProperties
{
    [Serializable()]
    public class DataBinding : ISerializable
    {
        #region Declarations

        private List<MyBinding> bindings;

        #endregion

        #region Public Properties

        public List<MyBinding> Bindings
        {
            get { return this.bindings; }
            set { this.bindings = value; }
        }
        #endregion

        #region Constructors
        public DataBinding()
        {
        }
        #endregion

        #region Methods

        public DataBinding(SerializationInfo info, StreamingContext ctxt)
        {
            this.bindings = (List<MyBinding>)info.GetValue("Bindings", typeof(List<MyBinding>));
        }

        public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
        {
            info.AddValue("Bindings", this.bindings);
        }

        #endregion
    }
}

